package com.dh.blog.service.impl;


import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.dh.blog.vo.HolderVo;

/**
 * mysql优化的service
 * @author David
 *
 */
@Service("MySQLArticleService")
@Transactional(readOnly=true)
public class MySQLArticleServiceImpl extends ArticleServiceImpl {
	/**
	 * 快了3ms，吃惊
	 */
	@Override
	protected Integer doSaveAndIncHolder(String blogId, Integer year,
			Integer month) {
		HolderVo holder = new HolderVo(year, month, blogId);
		super.articleDao.insertOrIncHolder(holder);
		return holder.getId();
	}
	
}
